package Department;

import Employee.FulltimeEmployee;
import Employee.ParttimeEmployee;

public class FADepartment extends Department{
    @Override
    public void visit(FulltimeEmployee fulltimeEmployee) {
        double salary = fulltimeEmployee.getWorkTime()<40?fulltimeEmployee.getWeeklyWage()-(40- fulltimeEmployee.getWorkTime())*80:fulltimeEmployee.getWeeklyWage()+ (fulltimeEmployee.getWorkTime()-40)*100;
        System.out.println("正式员工："+fulltimeEmployee.getName()+"的周工资为："+salary);
    }
    @Override
    public void visit(ParttimeEmployee parttimeEmployee) {
        System.out.println("临时员工"+parttimeEmployee.getName()+"的周工资为："+parttimeEmployee.getHourWage()*parttimeEmployee.getHourWage());
    }
}
